/**
 * 作者：陈文斌 on 2019/1/18.
 * 邮箱：chen_wennbin@163.com
 * 版本：v1.0
 */

import 'package:json_annotation/json_annotation.dart';
import 'package:crm/model/Company/company_info_model.dart';
import 'package:crm/model/Member/member_model.dart';
import 'package:crm/model/Company/company_department_model.dart';
import 'package:crm/model/Friend/friend_model.dart';
import 'package:crm/model/Employee/employee_privacy_settings_model.dart';
import 'package:crm/model/Friend/friend_group_model.dart';
import 'package:crm/model/Friend/friend_request_model.dart';
import 'package:crm/model/Employee/employee_favorite_model.dart';
import 'package:crm/model/Employee/employee_role_model.dart';

part 'employee_model.g.dart';

@JsonSerializable()
class EmployeeModel extends Object with _$EmployeeModelSerializerMixin {
  String Id;
  String AccId;
  String AccToken;
  int CheckInContinueDaysCount;
  String CompanyId;
  CompanyInfoModel Company;
  String UserId;
  MemberModel User;
  String CompanyDepartmentId;
  CompanyDepartmentModel CompanyDepartment;
  bool Gender;
  String PortraitUrl;
  String VisualizationImgUrl;
  String CreateTime;
  String DisabledTime;
  String HireDate;
  String ResignDate;
  String UseLang;
  String Name;
  String NamePinYin;
  String JobTitle;
  String PhoneRegionCode;
  String CompanyName;
  String CompanyBrandName;
  String PhoneNumber;
  String PhoneNumberImgEncodedData;
  String Email;
  String EmailImgEncodedData;
  bool IsResign;
  bool IsShowInCompanySite;
  int RelationshipOfUs;
  FriendModel FriendOfUs;
  EmployeePrivacySettingsModel PrivacySettings;
  List<FriendGroupModel> FriendGroups;
  List<FriendModel> Friends;
  List<FriendRequestModel> SendFriendRequests;
  List<FriendRequestModel> ReceivedFriendRequests;
  List<EmployeeFavoriteModel> Favorites;
  List<EmployeeRoleModel> Roles;

  EmployeeModel(
    this.Id,
    this.AccId,
    this.AccToken,
    this.CheckInContinueDaysCount,
    this.CompanyId,
    this.Company,
    this.UserId,
    this.User,
    this.CompanyDepartmentId,
    this.CompanyDepartment,
    this.Gender,
    this.PortraitUrl,
    this.VisualizationImgUrl,
    this.CreateTime,
    this.DisabledTime,
    this.HireDate,
    this.ResignDate,
    this.UseLang,
    this.Name,
    this.NamePinYin,
    this.JobTitle,
    this.PhoneRegionCode,
    this.CompanyName,
    this.CompanyBrandName,
    this.PhoneNumber,
    this.PhoneNumberImgEncodedData,
    this.Email,
    this.EmailImgEncodedData,
    this.IsResign,
    this.IsShowInCompanySite,
    this.RelationshipOfUs,
    this.FriendOfUs,
    this.PrivacySettings,
    this.FriendGroups,
    this.Friends,
    this.SendFriendRequests,
    this.ReceivedFriendRequests,
    this.Favorites,
    this.Roles,
  );

  @override
  factory EmployeeModel.fromJson(Map<String, dynamic> json) => _$EmployeeModelFromJson(json);
}
